public class Test {
    public static void main(String[] args) throws NullPointerException{
        MyArraylist myArraylist = new MyArraylist();
        myArraylist.add(1);
        myArraylist.add(2);
        myArraylist.add(3);
        myArraylist.add(4);
        System.out.println(myArraylist.usedSize);
        try {
            myArraylist.add(4,199);
        }catch (PosWrongfulException e) {
            e.printStackTrace();
        }
        myArraylist.display();
        System.out.println("==========================");

        int index = myArraylist.indexOf(4);
        System.out.println(index);
        myArraylist.set(myArraylist.indexOf(199),88);
        myArraylist.display();
        System.out.println("==========================");

        myArraylist.remove(3);
        myArraylist.display();
        System.out.println("==========================");

    }
}